//package com.tanhua.demo;
//
//import cn.hutool.core.io.FileUtil;
//import com.tanhua.template.AipFaceTemplate;
//import com.tanhua.template.OssTemplate;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.io.File;
//import java.io.FileInputStream;
//import java.io.FileNotFoundException;
//
//@SpringBootTest
//@RunWith(SpringRunner.class)
//public class SpringJunit {
//
//    @Autowired
//    private OssTemplate ossTemplate;
//
//    @Autowired
//    private AipFaceTemplate aipFaceTemplate;
//
//    @Test
//    public void test1() throws FileNotFoundException {
//
//        String file = "C:\\Users\\muzimoo\\Desktop\\图片\\12.jpg";
//        String url = ossTemplate.upload(file, new FileInputStream(file));
//        System.out.println(url);
//
//    }
//
//
//    @Test
//    public void test2() throws FileNotFoundException {
//
//        String filename = "C:\\Users\\23846\\Desktop\\新建文件夹\\2.jpg";
//        File file = new File(filename);
//        byte[] bytes = FileUtil.readBytes(file);
//        boolean flag = aipFaceTemplate.detect(bytes);
//        System.out.println(flag);
//
//    }
//}
